package com.sugar.queryinfo.module.business.dal.mysql.dataquerynomraltype;

import java.util.*;

import com.sugar.queryinfo.framework.common.pojo.PageResult;
import com.sugar.queryinfo.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.sugar.queryinfo.framework.mybatis.core.mapper.BaseMapperX;
import com.sugar.queryinfo.module.business.dal.dataobject.dataquerynomraltype.DataQueryNomralTypeDO;
import org.apache.ibatis.annotations.Mapper;
import com.sugar.queryinfo.module.business.controller.admin.dataquerynomraltype.vo.*;

/**
 * 数据查询默认类型 Mapper
 *
 * @author Ysugar
 */
@Mapper
public interface DataQueryNomralTypeMapper extends BaseMapperX<DataQueryNomralTypeDO> {

    default PageResult<DataQueryNomralTypeDO> selectPage(DataQueryNomralTypePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DataQueryNomralTypeDO>()
                .eqIfPresent(DataQueryNomralTypeDO::getUserId, reqVO.getUserId())
                .betweenIfPresent(DataQueryNomralTypeDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(DataQueryNomralTypeDO::getId));
    }

}